//
// Created by zerax on 2020/10/27.
//

#pragma once


#include <glm/glm.hpp>

class Camera {
private:
    glm::vec3 m_up, m_front, m_right;
    glm::vec3 m_position, m_worldUp;
    float m_yaw, m_pitch;
    float m_zoom;
public:
    explicit Camera(glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3 up = glm::vec3(0.0f, 1.0f, 0.0f), float yaw = -90.0f, float pitch = 0.0f);

    void moveForward(float amount);
    void moveUp(float amount);
    void moveRight(float amount);

    void moveYaw(float amount);
    void movePitch(float amount);
    void moveYawPitch(float yawAmount, float pitchAmount);

    void setZoom(float zoom);
    void moveZoom(float amount);

    glm::mat4 getMatrix();
    glm::vec3 getPosition();
private:
    void recalculateVectors();
};